package com.xyauto.uilibx.colorpicker;

import android.graphics.drawable.Drawable;

import java.util.Arrays;

/**
 * created by gongziyi on 2023/11/1 15:15
 */
public class CacheParams {

    private final int[] colorArray;
    private final int angle;
    private final Drawable drawable;


    public CacheParams(Drawable drawable, int[] colorArray, int angle) {
        this.colorArray = colorArray;
        this.angle = angle;
        this.drawable = drawable;
    }

    public Drawable getDrawable() {
        return drawable;
    }

    public boolean isChange(int[] colorArray, int angle) {
        return angle != this.angle || !Arrays.equals(colorArray, this.colorArray);
    }

}
